import logging
import time

# 日志配置
LOGGING_CONFIG = {
    "level": logging.INFO,
    "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
}

# MQTT配置
MQTT_CONFIG = {
    "broker": "broker.emqx.io",
    "port": 1883,
    "topic": "/broker/mqtt/Limo",
    "control_topic": "/broker/mqtt/Limo_s",
    "client_id": f"flask_mqtt_client_{int(time.time())}",
}

# 全局配置
RETRANSMISSION_INTERVAL = 5  # 重传间隔（秒）
MAX_RETRANSMISSION_TIMES = 3  # 最大重传次数
ENVIRONMENT_DATA_TIMEOUT = 10  # 环境数据超时时间（秒）
